<!DOCTYPE html>
<html lang="zh-cmn-Hans" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <link rel="shortcut icon" href="favicon.ico">
    <link rel="stylesheet" href="css/iconfont.css">
    <link rel="stylesheet" href="css/global.css">
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <link rel="stylesheet" href="css/bootstrap-theme.min.css">
    <link rel="stylesheet" href="css/swiper.min.css">
    <link rel="stylesheet" href="css/styles.css">
    <script src="js/jquery.1.12.4.min.js" charset="UTF-8"></script>
    <script src="js/bootstrap.min.js" charset="UTF-8"></script>
    <script src="js/swiper.min.js" charset="UTF-8"></script>
    <script src="js/global.js" charset="UTF-8"></script>
    <script src="js/jquery.DJMask.2.1.1.js" charset="UTF-8"></script>
    <title>农资商贸销售系统</title>
</head>
<body>
<!-- 顶部tab -->
<div th:replace="~{mall/common :: header}"></div>

<!-- 搜索栏 -->
<div th:replace="~{mall/common :: topSearch}"></div>

<!-- 首页导航栏 -->
<div class="top-nav bg3">
    <div class="nav-box inner">
        <div class="all-cat">
            <div class="title"><i class="iconfont icon-menu"></i> 全部分类</div>
            <div class="cat-list__box">
                <div class="cat-box" th:each="type : ${types}">
                    <div class="title">
                        <a th:href="@{'typeDetail?id=' + ${type.id}}"><span th:text="${type.name}"></span></a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- 顶部轮播 -->
<div class="swiper-container banner-box">
    <div class="swiper-wrapper">
        <div class="swiper-slide" th:each="banner : ${banners}">
            <a th:href="@{'goodsDetail?id=' + ${banner.goodsid}}"><img th:alt="${banner.altname}"
                                                                       th:src="${banner.imgurl}" class="cover"></a>
        </div>
    </div>
    <div class="swiper-pagination"></div>
</div>
<!-- 楼层内容 -->
<div class="content inner" style="margin-bottom: 40px;">
    <section th:each="type,status : ${randomTypes}"
             th:class="${status.index == 0 ? 'scroll-floor floor-2' : status.index == 1 ? 'scroll-floor floor-3': 'scroll-floor floor-4'}">
        <div class="floor-title">
            <span th:text="${type.name}"></span>
        </div>
        <div class="con-box">
            <a th:each="goods : ${#ctx['goods' + status.index]}" th:href="@{'goodsDetail?id=' + ${goods.id}}"
               class="floor-item">
                <div class="item-img hot-img">
                    <img th:src="${goods.img}" th:alt="${goods.title}" class="cover">
                </div>
                <div class="price clearfix">
                    <span class="pull-left cr fz16" th:text="${'￥'+goods.price}"></span>
                    <span class="pull-right c6" th:text="${goods.title}"></span>
                </div>
                <div class="name ep" th:title="${goods.describe}" th:text="${goods.describe}"></div>
            </a>
        </div>
    </section>
</div>

<!-- 右侧菜单 -->
<div th:replace="~{mall/common :: rightNav}"></div>
<!-- 底部信息 -->
<div th:replace="~{mall/common :: footer}"></div>
</body>
</html>
